<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>用户信息</title>
    <link rel="stylesheet" type="text/css" href="../css/amazeui.min.css" />
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
     <link rel="stylesheet" type="text/css" href="../css/tngou.css" />
    <style>
    .tngou-line-clamp {
	 
	  text-overflow: ellipsis; 
	  overflow: hidden;
	  height: 50px;
	}
    </style>
</head>
<body>
	 <!-- 头部 -->	
<header data-am-widget="header" id="header"
          class="am-header am-header-default am-header-fixed"  >
          <div class="am-header-left am-header-nav">
          <a href="#" class="" id="back">
                <i class="am-header-icon am-icon-chevron-left"></i>
          </a>
      </div>
      <h1 class="am-header-title">用户信息</h1>  
      
</header>

<div class="am-margin" id="user">    

	<div class="am-g" style="background-color:#5EB95E;color: #FFFFFF">
	  <div class="am-u-sm-3 am-u-sm-centered am-text-center" style="padding-top: 3px;">
	  <img id="portrait" class="am-circle am-img-responsive" /> 
	  <span id='account'></span>
	 </div>
	 <hr style="display: block;height: 0px;border-top: 1px solid #FFFFFF;box-sizing: content-box;">  
	 
	<ul class="am-avg-sm-2 am-thumbnails am-text-center am-text-sm">
	<li>性别：<span id='gender'>男</span> 
	</li>
	
	<li>年龄：<span id='age'>保密</span> </li>
		
	</ul>
	
	  </div>
	  
        <div data-am-widget="list_news" class="am-list-news am-list-news-default " >
		 
          <div class="am-list-news-bd">
			  <ul class="am-list am-list-static">
			   <li ><i class="am-icon-phone am-icon-fw"></i> 电话：<span id="phone"></span></li>			  			
			     <li ><i class="am-icon-qq am-icon-fw"></i> Q Q：<span id="qq"></span> </li>
			     <li ><i class="am-icon-weibo am-icon-fw"></i> 微博：<span id="weibo"></span> </li>
			   			     
			     <li ><i class="am-icon-map-marker am-icon-fw"></i> 地址：<span id="province"></span> </li>			 
			     <li ><i class="am-icon-clock-o am-icon-fw"></i> 注册时间：<span id='time'></span></li>
			 </ul>
			 </div>
		  </div>	
		
    </div>
        
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript" src="../script/amazeui.min.js"></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript">
 
   var user={};		          
	apiready = function(){

       api.getPrefs({
		    key: 'user'
		   }, function(ret, err){
		    user= JSON.parse(ret.value); 
		    $("#account").text(user.account);
		    if(user.avatar)
		    {
		    $("#portrait").attr("src",TngouImg+user.avatar);	  
		    }else
		    {
		      $("#portrait").attr("src",TngouImg+'/avatar/default.jpg');	
		    }  
		    $("#time").text(format(user.time));
		    if(user.gender==0)$("#gender").text('女');
		    if(user.birth)$("#age").text(age(user.birth));
		     if(user.phone)$("#phone").text(user.phone);
		     if(user.qq)$("#qq").text(user.qq);
		     if(user.weibo)$("#weibo").text(user.weibo);
      	    if(user.province)$("#province").text(user.province);
      
      });	
	 $api.addEvt($api.byId('back'), 'click', function(){
	            api.closeWin();
	        });	

		
		
	};
	
	
</script>
</html>